package tech.abing.spider.task.model;

import java.io.Serializable;

import tech.abing.spider.model.Proccessable;

/**
 * 存放在Redis的交易任务
 * 
 * @Description: TODO
 * @author Ivan 2862099249@qq.com
 * @date 2015年8月24日 上午10:41:13 
 * @version V1.0
 */
public class TaskTrade implements Proccessable, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String prodId;
	private String shopId;
	private String shopType;
	private String lastCatch;//交易记录的最后抓取时间，新任务为当天的零点
	
	private String catchDate;//采集开始时间，新任务为当天的零点
	
	private String monthSale;
	
	public String getMonthSale() {
		return monthSale;
	}
	public void setMonthSale(String monthSale) {
		this.monthSale = monthSale;
	}
	public String getCatchDate() {
		return catchDate;
	}
	public void setCatchDate(String catchDate) {
		this.catchDate = catchDate;
	}

	public String getProdId() {
		return prodId;
	}
	public void setProdId(String prodId) {
		this.prodId = prodId;
	}
	public String getShopId() {
		return shopId;
	}
	public void setShopId(String shopId) {
		this.shopId = shopId;
	}
	public String getShopType() {
		return shopType;
	}
	public void setShopType(String shopType) {
		this.shopType = shopType;
	}
	public String getLastCatch() {
		return lastCatch;
	}
	public void setLastCatch(String lastCatch) {
		this.lastCatch = lastCatch;
	}
	

	
	public TaskTrade(String prodId, String shopId, String shopType, String lastCatch, String catchDate, String monthSale) {
		super();
		this.prodId = prodId;
		this.shopId = shopId;
		this.shopType = shopType;
		this.lastCatch = lastCatch;
		this.catchDate = catchDate;
		this.monthSale = monthSale;
	}

	@Override
	public String toString() {
		return "TaskTrade [prodId=" + prodId + ", shopId=" + shopId + ", shopType=" + shopType + ", lastCatch="
				+ lastCatch + ", catchDate=" + catchDate + ", monthSale=" + monthSale + "]";
	}
	public TaskTrade() {
		super();
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((prodId == null) ? 0 : prodId.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TaskTrade other = (TaskTrade) obj;
		if (prodId == null) {
			if (other.prodId != null)
				return false;
		} else if (!prodId.equals(other.prodId))
			return false;
		return true;
	}
	
}
